//
//  JYTXinxiCell.m
//  JYT_IOS
//
//  Created by nxa-tankeke on 17/1/9.
//  Copyright © 2017年 nxa-yuanguoxiang. All rights reserved.
//

#import "JYTXinxiCell.h"
#import "School.h"

@interface JYTXinxiCell()
@property (weak, nonatomic) IBOutlet UILabel *isShuttle;
@property (weak, nonatomic) IBOutlet UILabel *isBeforeTrain;
@property (weak, nonatomic) IBOutlet UILabel *trainArea;
@property (weak, nonatomic) IBOutlet UILabel *coachCarNum;

@end

@implementation JYTXinxiCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setSchool:(School *)school
{
    _school = school;
    
    NSString *isShuttle =  school.isShuttle;
    if ([isShuttle isEqualToString:@"1"]) {
        [self.isShuttle setText:[NSString stringWithFormat:@"是否接送: %@", @"是"]];
    } else {
        [self.isShuttle setText:[NSString stringWithFormat:@"是否接送: %@", @"否"]];
    }
    
    
    NSString *isBeforeTrain =  school.isBeforeTrain;
    if ([isBeforeTrain isEqualToString:@"1"]) {
       
        [self.isBeforeTrain setText:[NSString stringWithFormat:@"支持先学后付: %@", @"是"]];
    } else {
       
        [self.isBeforeTrain setText:[NSString stringWithFormat:@"支持先学后付: %@", @"否"]];
    }
    
    NSString *trainArea = school.trainArea;
    [self.trainArea setText:[NSString stringWithFormat:@"场地规格: %@m²", trainArea]];
    
     NSString *coachCarN = school.coachCarNum;
    [self.coachCarNum setText:[NSString stringWithFormat:@"车辆数: %@辆", coachCarN]];
}
@end
